<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>属性与方法基础</title>
    <script src="https://unpkg.com/vue@next"></script>
  </head>
  <body>
    <div style="text-align: center;" id="Application">
    </div>
  </body>

  <script>
    const App= {
      data(){
        return {
          count:0
        }
      },
      methods: {
        add(){
          this.count ++
        }
      }
    }
    var instance = Vue.createApp(App).mount("#Application")

    instance.count = 15;
    setTimeout(()=>{instance.count = 20;},5000)
    instance.clickButton()
    console.log("Variable [instance.count] =>",instance.count);
    instance.clickButton()
    console.log("Variable [instance.$data.count] =>",instance.$data.count);
  </script>
</html>